use crate::mbc::interface::IMbc;
use crate::StrResult;

pub(crate) struct MBC0 {
    rom: Vec<u8>,
}

impl MBC0 {
    pub(crate) fn new(data: Vec<u8>) -> StrResult<Self> {
        Ok(Self { rom: data })
    }
}

impl IMbc for MBC0 {
    fn readrom(&self, addr: u16) -> u8 {
        self.rom[addr as usize]
    }
    fn readram(&self, addr: u16) -> u8 {
        0
    }

    fn writerom(&mut self, addr: u16, value: u8) {
        ()
    }

    fn writeram(&mut self, addr: u16, value: u8) {
        ()
    }

    fn is_battery_backed(&self) -> bool {
        false
    }

    fn loadram(&mut self, ramdata: &[u8]) -> StrResult<()> {
        Ok(())
    }

    fn dumpram(&self) -> Vec<u8> {
        Vec::<u8>::new()
    }

    fn check_and_reset_ram_updated(&mut self) -> bool {
        false
    }
}
